Integrand size = 10, antiderivative size = 10 \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=-\cos (x)+\log (1+\cos (x)) \]
[Out]
Time = 0.08 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {4477, 2912, 45} \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=\log (\cos (x)+1)-\cos (x) \]
[In]
[Out]
Rule 45
Rule 2912
Rule 4477
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos (x) \sin (x)}{1+\cos (x)} \, dx \\ & = -\text {Subst}\left (\int \frac {x}{1+x} \, dx,x,\cos (x)\right ) \\ & = -\text {Subst}\left (\int \left (1+\frac {1}{-1-x}\right ) \, dx,x,\cos (x)\right ) \\ & = -\cos (x)+\log (1+\cos (x)) \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 2.00 \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=-2 \cos ^2\left (\frac {x}{2}\right )+2 \log \left (\cos \left (\frac {x}{2}\right )\right ) \]
[In]
[Out]
Time = 1.24 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.10
method | result | size |
derivativedivides | \(-\cos \left (x \right )+\ln \left (\cos \left (x \right )+1\right )\) | \(11\) |
default | \(-\cos \left (x \right )+\ln \left (\cos \left (x \right )+1\right )\) | \(11\) |
risch | \(-i x -\frac {{\mathrm e}^{i x}}{2}-\frac {{\mathrm e}^{-i x}}{2}+2 \ln \left ({\mathrm e}^{i x}+1\right )\) | \(30\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.20 \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=-\cos \left (x\right ) + \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \]
[In]
[Out]
\[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=\int \frac {\cos {\left (x \right )}}{\cot {\left (x \right )} + \csc {\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (10) = 20\).
Time = 0.30 (sec) , antiderivative size = 34, normalized size of antiderivative = 3.40 \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=-\frac {2}{\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1} - \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=-\cos \left (x\right ) + \log \left (\cos \left (x\right ) + 1\right ) \]
[In]
[Out]
Time = 23.60 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.40 \[ \int \frac {\cos (x)}{\cot (x)+\csc (x)} \, dx=-\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )-\frac {2}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2+1} \]
[In]
[Out]